package net.csdra.libraryborrowing.service.user;

import net.csdra.libraryborrowing.domain.user.User;
import net.csdra.libraryborrowing.domain.user.UserBorrowRepository;
import net.csdra.libraryborrowing.domain.user.UserRepository;
import net.csdra.libraryborrowing.util.Utils;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by add on 2017/10/17.
 */
public class UserComponentsImpl implements UserComponents {
    @Autowired
    UserRepository userRepository;

    @Override
    public String getUserId(String recipientUserName) {
        return this.userRepository.findByUserName(recipientUserName).getId();
    }
}
